#include "uti_mq.h"
#include "uti_consolecolor.h"



Mq::Mq(unsigned int size)
{
	m_size = size;

	m_pser = new char [m_size];
	if (NULL == m_pser)
	{
		SetConsoleColor(FOREGROUND_GREEN);  
		cerr<<"[Mq] m_pser init Failed"<<endl;
		SetConsoleColor(FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);  

		return;
	}
	memset(m_pser, 0, m_size);


	m_setindex = 0;

	m_getindex = 0;

};

Mq::~Mq()
{
	if (m_pser)
		delete m_pser;

};


void Mq::ResetMq()
{
	memset(m_pser, 0, m_size);


	m_setindex = 0;

	m_getindex = 0;

};

